home *** CD-ROM | disk | FTP | other *** search
- 'Note: EXTRACT requires Internet Explorer 6.0 or better to be installed
-
- Msgbox ("This example will retrieve the current exchange rate for US$, EURO and GBP. This macro will run in the system tray.")
- dim ExchangeRate
-
- set iim1= CreateObject ("iimwsh.iim")
-
- iret = iim1.iimInit ("-tray")
- iret = iim1.iimDisplay("Extract Example")
- iret = iim1.iimSet("-tray", "")
- iplay = iim1.iimPlay("wsh-extract")
- data = iim1.iimGetLastMessage()
- iret = iim1.iimExit
-
- If iplay = 2 Then
- ExchangeRate= Split(data, "[EXTRACT]")
- s = "One US$ costs " + ExchangeRate(0) + " EURO or " + ExchangeRate(1) + " British Pounds (GBP)"
- MsgBox s
- End If
-
- If iplay = 1 Then
- MsgBox "Done, but no data extracted. This case should not happen unless there is no EXTRACT command in the macro."
- End If
-
- If iplay < 0 Then
- ExchangeRate= Split(data, "[EXTRACT]")
- s = "The following error occurred: " + vbCrLf + vbCrLf + ExchangeRate(0)
- MsgBox s
- End If
-
- WScript.Quit(0)
-